#define _CRT_SECURE_NO_WARNINGS	

char* makeGood(char* s)
{
    int len = strlen(s);
    char* str = (char*)malloc(len + 1);
    int top = 0;
    for (int i = 0; i < len; i++)
    {
        str[top++] = s[i];
        if (top >= 2 && abs(str[top - 1] - str[top - 2]) == 32)
            top -= 2;
    }
    str[top] = '\0';
    return str;
}